import React , {useEffect} from 'react'
import {useSelector,useDispatch} from "react-redux"
import {fn,del,getlist} from "../../store/feature/featur"
function Exam() {
  const store = useSelector(state=>state.counter)
  const dispatch = useDispatch()
  console.log(store);
  useEffect(()=>{
    dispatch(getlist([1,2,13,4,5]))
  
  },[])
  let fn1 = ()=>{
      dispatch(fn({step:1}))
  }
  return (
    <div>
       <h4>{store.count}</h4>
      <button onClick={fn1}>点击</button>
    </div>
  )
}

export default Exam